﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections;

namespace 兔子繁衍1._0
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int n, month = 1, x1 = 1, x2 = 1, x = 0, i = 0;
            
            Hashtable ht = new Hashtable();
            string name , num ;

            Console.WriteLine("Input n:");
            n=int.Parse(Console.ReadLine());

            //for(int j =1; j <= 2; j++)
            //{
            //   Console.WriteLine("请输入1月第{0}只兔子姓名：", j );
            //   name = Console.ReadLine();
            //   num = "0" + month.ToString() + "00" + j.ToString();
            //    ht.Add(name, num);
            //}
          
            //问题实际是求斐波那契数列1 1 2 3 5 8 ...
            while (x <= n)
            {   
                x = x1 + x2;
                x1 = x2;
                x2 = x;

                i = x - x1 -i;
        
                    for (int j = 1; j <= 2 * i; j++)
                    {
                        Console.WriteLine("请输入{0}月第{1}只兔子姓名：", month, j);
                        name = Console.ReadLine();
                        //if( month < 10 || j < 10 )
                        num = "0" + month.ToString() + "00" + j.ToString();

                        ht.Add(name, num);
                    }

                
                month++;
            }

            Console.WriteLine("mouths={0}", month);

            foreach (string k in ht.Keys)
            {
                Console.WriteLine(k + " " + ht[k]);
            }

            Console.ReadLine();
        }
    }
}
